import { defHttp } from '/@/utils/http/axios';
const baseAPi = '/Alarm/';
const baseAPi2 = '/SysDictType/';
/**
 * @description: 保存配置文件
 */
export function saveconfig() {
  return defHttp.post({ url: `${baseAPi}saveconfig` });
}
/**
 * @description: 获取告警树
 */
export function getalarmtree(data) {
  return defHttp.post({ url: `${baseAPi}getalarmtree`, data });
}
/**
 * @description: 新增分组
 */
export function addgroup(data) {
  return defHttp.post({ url: `${baseAPi}addgroup`, data });
}
/**
 * @description: 编辑分组
 */
export function editgroup(data) {
  return defHttp.post({ url: `${baseAPi}editgroup`, data });
}
/**
 * @description: 删除分组
 */
export function deletegroup(data) {
  return defHttp.post({ url: `${baseAPi}deletegroup`, data });
}
/**
 * @description: 获取告警项
 */
export function getalarmitem(data) {
  return defHttp.post({ url: `${baseAPi}getalarmitem`, data });
}
/**
 * @description: 新增告警项
 */
export function addalarmitem(data) {
  return defHttp.post({ url: `${baseAPi}addalarmitem`, data });
}

/**
 * @description: 编辑告警项
 */
export function editalarmitem(data) {
  return defHttp.post({ url: `${baseAPi}editalarmitem`, data });
}

/**
 * @description: 删除告警项
 */
export function deletealarmitem(data) {
  return defHttp.post({ url: `${baseAPi}deletealarmitem`, data });
}
/**
 * @description: 获取规则明细
 */
export function getalarmruledetail(data) {
  return defHttp.post({ url: `${baseAPi}getalarmruledetail`, data });
}
/**
 * @description: 编辑规则明细
 */
export function editalarmruledetail(data) {
  return defHttp.post({ url: `${baseAPi}editalarmruledetail`, data });
}
/**
 * @description: 删除规则明细
 */
export function deletealarmruledetail(data) {
  return defHttp.post({ url: `${baseAPi}deletealarmruledetail`, data });
}

/**
 * @description: 获取告警记录/报警明细
 */
export function getalarmrecord(data) {
  return defHttp.post({ url: `${baseAPi}getalarmrecord`, data });
}
/**
 * @description: 改变告警状态
 */
export function changealarmstatus(data) {
  return defHttp.post({ url: `${baseAPi}changealarmstatus`, data });
}

export function getdatalist(data) {
  return defHttp.post({ url: `${baseAPi2}getdatalist`, data });
}

/**
 * @description: 获取设备报警统计
 */
export function getalarmrecordhomestatis(data) {
  return defHttp.post({ url: `${baseAPi}getalarmrecordhomestatis`, data });
}
/**
 * @description: 获取设备报警总数Top10
 */
export function getdevicealarmstatis(data) {
  return defHttp.post({ url: `${baseAPi}getdevicealarmstatis`, data });
}
/**
 * @description: 获取报警类别Top10
 */
export function getalarmtypestatis(data) {
  return defHttp.post({ url: `${baseAPi}getalarmtypestatis`, data });
}
/**
 * @description: 获取最新报警实时数据
 */
export function getalarmrecorddasboard(data) {
  return defHttp.post({ url: `${baseAPi}getalarmrecorddasboard`, data });
}
/**
 * @description: 获取最新报警明细
 */
export function getalarmrecorddetail(data) {
  return defHttp.post({ url: `${baseAPi}getalarmrecorddetail`, data });
}
/**
 * @description: 获取报警统计列表
 */
export function getalarmrecordstatis(data) {
  return defHttp.post({ url: `${baseAPi}getalarmrecordstatis`, data });
}

/**
 * @description: 获取报警分组属性信息
 */
export function getalarmdiagnose(data) {
  return defHttp.post({ url: `${baseAPi}getalarmdiagnose`, data });
}
/**
 * @description: 获取报警分组图表数据
 */
export function recorddiagnosis(data) {
  return defHttp.post({ url: '/HDA/recorddiagnosisgroup', data });
}
/**
 * @description: 通过变量名获取设备属性
 */
export function gettags(data) {
  return defHttp.post({ url: `${baseAPi}gettags`, data });
}